<?
session_start();

include_once "config.php";
include_once "prerequisite.php";
include_once "umls_toolbox.php";

if ( $cmd == "get" ) {
	$query_rcui = str_replace("_", "_", $query_rcui);
	$sub_tree = get_sub_tree($query_bcui, $query_rcui);
	
	if ( count($sub_tree) ) {
		$html = make_sub_tree_html($sub_tree, false);
		if ( !$query_rcui ) $query_rcui = "TOP";

		echo json_encode(array('id'=>$query_rcui, 'html'=>$html));
	}
}
// <meta http-equiv="content-type" content="text/html; charset=utf-8">
?>